home *** CD-ROM | disk | FTP | other *** search
- Path: news-m01.ny.us.ibm.net!usenet
- From: rodenas@ibm.net (Fernando Rodenas)
- Newsgroups: comp.lang.rexx,bit.listserv.tsorexx,bit.listserv.ibm-main
- Subject: Re: Formatting in REXX
- Date: Thu, 11 Jan 1996 22:24:20 GMT
- Distribution: inet
- Message-ID: <4d412g$2oh4@news-s01.ny.us.ibm.net>
- References: <4d205n$qk0@preeda.internex.net.au>
- Reply-To: rodenas@ibm.net
- NNTP-Posting-Host: slip139-92-17-228.emea.ibm.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- srinivas@connexus.apana.org.au (Srinivas Kopparapu) wrote:
-
- You can use LEFT and RIGHT instructions:
-
- LEFT(var_name,positions,padding_char)
- RIGHT "
-
- So:
-
- LEFT('abc',6) -> 'abc '
- LEFT('abc',6,'-') -> 'abc---'
- RIGHT('abc',6) -> ' abc'
- RIGHT('abc',6,'-') -> '---abc'
-
-
- >Organization: connexus.apana.org.au
- >Summary:
- >Keywords:
-
- >Hello everyone,
- >I am using MVS/REXX (IBM) and want to know whether there is
- >an easy way for formatting texts/numbers. I read sequential
- >datasets/files and want to produce reports with columns and headers
- >aligned properly. Basically I want to specify how many characters
- >a particular variable should be taking in the report appropriately
- >padded with blanks.
-
- >At present I am doing this using LENGTH and COPIES functions. But
- >the expression becomes cumbersome if many variables needs to be
- >in the same line.
-
- >I would appreciate any ideas/tips or pointers in the right direction.
-
- >TIA
- >Sri
-
-
- ==================================================
- Fernando Rodenas rodenas@ibm.net
- Barcelona 100023.2463@compuserve.com
- Spain ISOC member - OS/2 Team
- http://ourworld.compuserve.com/homepages/rodenas
- ==================================================
-
-